{include file="header.inc.html"}
<style>
.sub{
	text-indent:30px;
}
.toggle,.editop{
	cursor:pointer;
}
</style>
<body class="layui-layout-body">


<div class="layui-layout layui-layout-admin">
	  {include file="left.inc.html"}  
	  <div class="layui-body">
		<!-- 内容主体区域 -->
		<div style="padding: 15px;">


			<div class="layui-breadcrumb">
			   {include file="where.inc.html"}
			</div>
<form class="layui-form" action="" style="padding:10px;">
			
<div id="main_table_id">

		<table lay-filter="main_table_" class="layui-table">
		  <colgroup>
			<col width="50">
			<col>
		  </colgroup>
		<thead>
		<tr>
			<th class="xxxlayui-bg-red">{$group.name}绑定的模块功能</th>
		</tr>
		</thead>
		{foreach $rs as $k => $v}
		<tr>
			<td class="layui-formxx"><input type="checkbox"  onclick="setCheck('__{$v.module}',this.checked)" name="ghfdgf" lay-ignore id="module_{$v.module}"><label for="module_{$v.module}">{$v.name}({$v.module})</label></td>
		</tr>
		{foreach $v['op'] as $kk => $vv}
		<tr>
			<td style="padding-left:50px;">
		
				<div class="layui-input-inline" style="">
				<input lay-ignore type="checkbox" id="op_{$vv.id}"  class="{$v.module}_{$vv.method} op __{$v.module} " name="op[{$vv.id}]" value="{$vv.id}" ><label for="op_{$vv.id}" class="label_{$v.module}_{$vv.method}">{$vv.name}({$vv.method})&nbsp;&nbsp;</label>
				</div>

		
			</td>
		</tr>
		{/foreach}


			
		{/foreach}
		<tr>
			<th><label for="all">全选</label><input id="all" lay-ignore type="checkbox" title="全选" onclick="setCheck('op',this.checked)"></th>
		</tr>

</table></div>


			<div class="layui-form-item">
    <div class="layui-input-block">
	
      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
    </div>
  </div>
  <input type="hidden" name="id" value="{$id}">
 </form>


			{**###################################################**}
			
		</div>	
	  </div><!-- /layui-body -->


<script>
layui.use(['element', 'table','form','layer','laypage', 'layedit','upload'], function(){
  var element = layui.element,
  $ = layui.jquery,
  table = layui.table,
  form = layui.form,
  laypage = layui.laypage,
  layedit = layui.layedit,
  upload = layui.upload,
  element = layui.element,
  layer = layui.layer;

  

	
	formSubmit('{_url m="dobindmodule"}','formDemo','comfirm:{_url m="indexcategory"}');


{foreach $group['auth_arr'] as $k => $v}
setCheck('{$v}', true);
{/foreach}



	
});


function setCheck(class_id, a){
	
	layui.$('.'+class_id).prop('checked',a);
	if(a){
		$('.label_'+class_id).css({'color':'red'});
	}else{
		$('.label_'+class_id).css({'color':''});

	}
}



</script>

{include file="footer.inc.html"}



